﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Oops.Xna.Framework
{
	/// <summary>
	/// An extension to the <see cref="Microsoft.Xna.Framework.GameTime" /> class.
	/// </summary>
	public static class GameTimeExtension
	{
		/// <summary>
		/// Returns the seconds elapsed from the <see cref="Microsoft.Xna.Framework.GameTime"/>.
		/// </summary>
		/// <param name="gameTime">The source <see cref="Microsoft.Xna.Framework.GameTime"/>.</param>
		/// <returns>The seconds elapsed, including fractions of a second.</returns>
		public static float ElapsedSeconds(this GameTime gameTime)
		{
			return (float)gameTime.ElapsedGameTime.TotalSeconds;
		}
	}
}
